package com.ty.entity;

import com.ty.enums.CategoryStatus;
import lombok.Data;

@Data
public class Category extends BaseEntity{
    /**编号*/
    private Integer id;
    /**类名名称*/
    private String name;
    /**父类名称*/
    private String parentName;
    /**父类id*/
    private Integer parentId;
    /**类目图片*/
    private String img;
    /**状态*/
    private Integer status;
    /**排序*/
    private Integer seq;

    private String statusX;

    public String StatusX() {

        CategoryStatus categoryStatus = CategoryStatus.getByCode(this.getStatus());
        if (categoryStatus != null)
            return  categoryStatus.getMessage();
        return "未定义";
    }

}
